
local MainScene = class("MainScene", cc.load("mvc").ViewBase)

function MainScene:onCreate()
    -- TTFLabel
    local ttfp = {
        text = "TTF LABEL, TTF 文本标签",
        font = "FZDHJT.TTF",
        size = 50,
        dimensions = cc.size(0, 0),
        align = cc.TEXT_ALIGNMENT_CENTER,
        valign = cc.VERTICAL_TEXT_ALIGNMENT_TOP
    }
    cc.Label:createWithTTF(ttfp.text, ttfp.font, ttfp.size, ttfp.dimensions, ttfp.align, ttfp.valign)
        :move(display.cx, display.cy + 200)
        :setColor(display.COLOR_WHITE)
        :addTo(self)
    
    -- BMFontLabel
    local bmfp = {
        font = "helvetica-32.fnt",
        text = "BMFont LABEL",
    }
    cc.Label:createWithBMFont(bmfp.font, bmfp.text)
        :move(display.cx, display.cy)
        :addTo(self)
end

return MainScene
